<?php
	class DatabaseConfigController extends ConfigAppController
	{
		var $components = array("RequestHandler");
		function admin_setting($modelName = null)
		{
			$this->pageTitle = __("Database Settings");
			if($this->data)
			{
				$this->DatabaseConfig->set($this->data);
				if($this->DatabaseConfig->validates())
				{
					if($this->DatabaseConfig->save($this->data,false,false))
					{
						$this->successMsg(__("Database settings have been saved!"));
					}
				}
			}else
			{
				$this->data['DatabaseConfig'] = cr("cmsConfig.Database"); 	
			}
			$this->helpers[] = "Form";
		}
	}
?>